<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var reverseEach = function (ary, callback) {
        for(var i=ary.length - 1;i>=0;i--){
            callback(i,ary[i]);
        }
    }
    reverseEach([1,2,3],function (i,o) {
        console.log(o);

    })
</script>
</body>
</html>